package com.feng.zhongji.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("department")
public class Department {
//    private Integer d_id;
//    private String d_name;
    @TableField("d_id")//[Department(did=101, dname=力堂), Department(did=102, dname=敏堂), Department(did=103, dname=御堂), Department(did=104, dname=药堂)]//添加了这个注解才能解决下划线问题
    private Integer did;
    @TableField("d_name")
    private String dname;
}
/**
 INSERT INTO USER VALUE (1002,'小舞','xw');

 CREATE TABLE department(
 d_id INTEGER PRIMARY KEY AUTO_INCREMENT ,
 d_name VARCHAR(20)
 ) ;
 */